package win.smartown.mistyle.viewController.loading;

import android.view.View;
import android.view.ViewStub;

import win.smartown.mistyle.demo.R;

/**
 * Created by smartown on 2017/3/18.
 * <br>
 * Description:数据加载中加载提示
 */
public class LoadingViewController implements LoadingViewInterface {

    private View view;

    public LoadingViewController(ViewStub viewStub) {
        viewStub.setLayoutResource(R.layout.layout_loading_loading);
        view = viewStub.inflate();
    }

    @Override
    public void startLoading() {
        view.setVisibility(View.VISIBLE);
    }

    @Override
    public void finishLoading() {
        view.setVisibility(View.GONE);
    }
}
